Allow choosing which types of search suggestions to show#3546
Allow choosing which types of search suggestions to show#3546TobiGr merged 3 commits intoTeamNewPipe:devfrom
Conversation
|
I think we should also allow the user to stop showing local search suggestions. E.g. when showing something to another persion and using the search, one might not want to expose the search history. |
|
What about replacing the current on-off option in settings with a spinner containing "All", "Only remote", "Only local", "None"? |
|
Sounds good |
I just checked to see what a spinner is. Wouldn't it be weird to have one odd spinner menu standing out when the rest of the settings all contain pop up dialogues? |
|
@TobiGr done & updated the PR description |
|
That's a spinner? The Android documentation is misleading, then. It looked like a Kitkat option selector, there. |
|
@opusforlife2 no, that's not a spinner, that's a multiselect menu, I said spinner just to show that I wanted to make the menu entry contain multiple things (probably also because no other name came to my mind ;-) ) |
app/src/main/java/org/schabi/newpipe/settings/NewPipeSettings.java
Outdated
Show resolved
Hide resolved
|
I found this PR in #3540, have the same problem. What's the state of the PR? Is something stops from merging? |
|
This PR is blocked by the settings migration code, as explained by @TobiGr above, so his pr needs to be merged before |
1e8e45b to
91b3714
Compare
|
Rebased and added settings migration. Here are the test apks; |
91b3714 to
28429b0
Compare
|
Rebased again. @TobiGr @opusforlife2 @B0pol @anpic could you test with the instructions above? |
28429b0 to
1f36197
Compare
679bc75 to
2aeccc0
Compare
I tested updating in the three ways possible (suggestions enabled/disabled in the before app and no before app installed at all) and for all of them I tried the 4 combinations of the search suggestions setting, everything worked fine. |
app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/org/schabi/newpipe/fragments/list/search/SearchFragment.java
Outdated
Show resolved
Hide resolved
|
Is something that stops it from being merged? |
|
I rebased and added a comment to explain how to add a migration to |
local, remote, both, none Replacing the old on-off setting
…s the correct types
|
I rebased again |
|
Damn, how many times did i forget about this PR? Sorry |
What is it?
Description of the changes in your PR
booleanwhile the new one stores aSet<String>, I had to create a migration function and call it inNewPipeSettings.init(). If the previous value wastrue, both local and remote suggestions are activated, otherwise they are both deactivated. I testes this and it works both when updating the app and when importing a database with the old setting.Fixes the following issue(s)
Testing apk
@anpic could you test if this option suits you?
app-debug_1.zip
Agreement